import request from '@/utils/request';
import type { PageResult, ResponseData } from '../typing';
// 参数接口
export interface GetAssetFileParams {
    /*当前第几页(默认1) */
    current?: number;
    /*每页条数(默认20) */
    size?: number;
    /*客户姓名 */
    owner?: string;
    /*资产ID */
    propertyId?: string;
    /*管家ID */
    housekeeperId?: string;
    /*项目code */
    projectCode?: string;
    /*是否已绑定 */
    isBind?: boolean;
    /* */
    page?: {
        /* */
        records?: {
            /*项目Code */
            projectCode?: string;
            /*项目名称 */
            projectName?: string;
            /*楼号 */
            building?: string;
            /*单元 */
            unit?: string;
            /*楼层 */
            floor?: string;
            /*房间 */
            room?: string;
            /*类型:1->住宅,2->车位,3->别墅,4->商铺,5->商办,6->医疗,7->商业,8->院校 */
            type?: string;
            /*管家ID */
            housekeeperId?: string;
            /*管家名称 */
            housekeeper?: string;
            /*业主姓名 */
            owner?: string;
            /*业主手机号 */
            phone?: string;
            /*是否绑定 */
            isBind?: boolean;
        }[];
        /* */
        total?: Record<string, unknown>;
        /* */
        size?: Record<string, unknown>;
        /* */
        current?: Record<string, unknown>;
        /* */
        orders?: {
            /* */
            column?: string;
            /* */
            asc?: boolean;
        }[];
        /* */
        optimizeCountSql?: boolean;
        /* */
        searchCount?: boolean;
        /* */
        optimizeJoinOfCountSql?: boolean;
        /* */
        maxLimit?: Record<string, unknown>;
        /* */
        countId?: string;
        /* */
        pages?: Record<string, unknown>;
    };
}
// 响应接口
export interface GetAssetFileRes {
    /* */
    code: number;
    /* */
    data: {
        /* */
        size: number;
        /* */
        total: number;
        /* */
        current: number;
        /* */
        records: {
            /*项目Code */
            projectCode: string;
            /*项目名称 */
            projectName: string;
            /*楼号 */
            building: string;
            /*单元 */
            unit: string;
            /*楼层 */
            floor: string;
            /*房间 */
            room: string;
            /*类型:1->住宅,2->车位,3->别墅,4->商铺,5->商办,6->医疗,7->商业,8->院校 */
            type: string;
            /*管家ID */
            housekeeperId: string;
            /*管家名称 */
            housekeeper: string;
            /*业主姓名 */
            owner: string;
            /*业主手机号 */
            phone: string;
            /*是否绑定 */
            isBind: boolean;
        }[];
        /* */
        pages: number;
    };
    /* */
    msg: string;
}
/**
 * 资产档案Page
 * @param {object} params AssetFileQuery
 * @param {number} params.current 当前第几页(默认1)
 * @param {number} params.size 每页条数(默认20)
 * @param {string} params.owner 客户姓名
 * @param {string} params.propertyId 资产ID
 * @param {string} params.housekeeperId 管家ID
 * @param {string} params.projectCode 项目code
 * @param {boolean} params.isBind 是否已绑定
 * @param {object} params.page
 * @returns
 */
export function getAssetFile(params: GetAssetFileParams): Promise<GetAssetFileRes> {
    return request.post(`/property/information/file/page`, params);
}
// 参数接口
export interface GetBindingRecordParams {
    /*当前第几页(默认1) */
    current?: number;
    /*每页条数(默认20) */
    size?: number;
    /*客户姓名 */
    owner?: string;
    /*管家ID */
    housekeeperId?: string;
    /*项目code */
    projectCode?: string;
    /* */
    page?: {
        /* */
        records?: {
            /*项目Code */
            projectCode?: string;
            /*项目名称 */
            projectName?: string;
            /*楼号 */
            building?: string;
            /*单元 */
            unit?: string;
            /*楼层 */
            floor?: string;
            /*房间 */
            room?: string;
            /*类型:1->住宅,2->车位,3->别墅,4->商铺,5->商办,6->医疗,7->商业,8->院校 */
            type?: string;
            /*管家ID */
            housekeeperId?: string;
            /*管家名称 */
            housekeeper?: string;
            /*业主姓名 */
            owner?: string;
            /*业主手机号 */
            phone?: string;
            /*是否绑定 */
            isBind?: boolean;
            /*绑定时间 */
            createTime?: string;
        }[];
        /* */
        total?: Record<string, unknown>;
        /* */
        size?: Record<string, unknown>;
        /* */
        current?: Record<string, unknown>;
        /* */
        orders?: {
            /* */
            column?: string;
            /* */
            asc?: boolean;
        }[];
        /* */
        optimizeCountSql?: boolean;
        /* */
        searchCount?: boolean;
        /* */
        optimizeJoinOfCountSql?: boolean;
        /* */
        maxLimit?: Record<string, unknown>;
        /* */
        countId?: string;
        /* */
        pages?: Record<string, unknown>;
    };
}
// 响应接口
export interface GetBindingRecordRes {
    /* */
    code: number;
    /* */
    data: {
        /* */
        size: number;
        /* */
        total: number;
        /* */
        current: number;
        /* */
        records: {
            /*项目Code */
            projectCode: string;
            /*项目名称 */
            projectName: string;
            /*楼号 */
            building: string;
            /*单元 */
            unit: string;
            /*楼层 */
            floor: string;
            /*房间 */
            room: string;
            /*类型:1->住宅,2->车位,3->别墅,4->商铺,5->商办,6->医疗,7->商业,8->院校 */
            type: string;
            /*管家ID */
            housekeeperId: string;
            /*管家名称 */
            housekeeper: string;
            /*业主姓名 */
            owner: string;
            /*业主手机号 */
            phone: string;
            /*是否绑定 */
            isBind: boolean;
            /*绑定时间 */
            createTime: Record<string, unknown>;
        }[];
        /* */
        pages: number;
    };
    /* */
    msg: string;
}
/**
 * 绑定记录Page
 * @param {object} params BindingRecordQuery
 * @param {number} params.current 当前第几页(默认1)
 * @param {number} params.size 每页条数(默认20)
 * @param {string} params.owner 客户姓名
 * @param {string} params.housekeeperId 管家ID
 * @param {string} params.projectCode 项目code
 * @param {object} params.page
 * @returns
 */
export function getBindingRecord(params: GetBindingRecordParams): Promise<GetBindingRecordRes> {
    return request.post(`/property/information/record/page`, params);
}
